<?php

/*
 * 处理按小时执行的任务
 * @author birdy <freebirdy@foxmail.com>
 * @link http://www.aiyuangong.com
 */

namespace app\admin\command\cron;

use app\admin\command\Base;
use think\console\Input;
use think\console\input\Option;
use think\console\Output;

class Hour extends Base
{
    //处理任务计划中的待执行任务
    public function execute(Input $input, Output $output)
    {
        
    }
    
    //命令行配置说明
    protected function configure()
    {
        $name = get_class($this);
        if ($name == __CLASS__) {
            $this->setName('hour')
                    ->addOption('type', 't', Option::VALUE_OPTIONAL, 'type to exec', null)
                    ->addOption('limit', 'l', Option::VALUE_OPTIONAL, 'exec nums each time', 0)
                    ->setDescription('每小时执行一次的');
        } else {
            $this->configure_task();
        }
    }
}